const Sequelize = require('sequelize');

module.exports = conn => {
    // 设备
    let Device = conn.define('Device', {
        // 设备名
        name: {
            type: Sequelize.STRING(),
            allowNull: false
        },
        // 设备号
        deviceId: {
            type: Sequelize.STRING(),
            allowNull: false
        },
    }, {
        tableName: 'devices'
    });

    return Device;
}